home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIWritablePropertyBag.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  112 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIWritablePropertyBag.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIWritablePropertyBag_h__
  6. #define __gen_nsIWritablePropertyBag_h__
  7.  
  8.  
  9. #ifndef __gen_nsIPropertyBag_h__
  10. #include "nsIPropertyBag.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIWritablePropertyBag */
  19. #define NS_IWRITABLEPROPERTYBAG_IID_STR "96fc4671-eeb4-4823-9421-e50fb70ad353"
  20.  
  21. #define NS_IWRITABLEPROPERTYBAG_IID \
  22.   {0x96fc4671, 0xeeb4, 0x4823, \
  23.     { 0x94, 0x21, 0xe5, 0x0f, 0xb7, 0x0a, 0xd3, 0x53 }}
  24.  
  25. class NS_NO_VTABLE nsIWritablePropertyBag : public nsIPropertyBag {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWRITABLEPROPERTYBAG_IID)
  29.  
  30.   /**
  31.      * Set a property with the given name to the given value.  If
  32.      * a property already exists with the given name, it is
  33.      * overwritten.
  34.      */
  35.   /* void setProperty (in AString name, in nsIVariant value); */
  36.   NS_IMETHOD SetProperty(const nsAString & name, nsIVariant *value) = 0;
  37.  
  38.   /**
  39.      * Delete a property with the given name.
  40.      * @throws NS_ERROR_FAILURE if a property with that name doesn't
  41.      * exist.
  42.      */
  43.   /* void deleteProperty (in AString name); */
  44.   NS_IMETHOD DeleteProperty(const nsAString & name) = 0;
  45.  
  46. };
  47.  
  48. /* Use this macro when declaring classes that implement this interface. */
  49. #define NS_DECL_NSIWRITABLEPROPERTYBAG \
  50.   NS_IMETHOD SetProperty(const nsAString & name, nsIVariant *value); \
  51.   NS_IMETHOD DeleteProperty(const nsAString & name); 
  52.  
  53. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  54. #define NS_FORWARD_NSIWRITABLEPROPERTYBAG(_to) \
  55.   NS_IMETHOD SetProperty(const nsAString & name, nsIVariant *value) { return _to SetProperty(name, value); } \
  56.   NS_IMETHOD DeleteProperty(const nsAString & name) { return _to DeleteProperty(name); } 
  57.  
  58. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  59. #define NS_FORWARD_SAFE_NSIWRITABLEPROPERTYBAG(_to) \
  60.   NS_IMETHOD SetProperty(const nsAString & name, nsIVariant *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(name, value); } \
  61.   NS_IMETHOD DeleteProperty(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteProperty(name); } 
  62.  
  63. #if 0
  64. /* Use the code below as a template for the implementation class for this interface. */
  65.  
  66. /* Header file */
  67. class nsWritablePropertyBag : public nsIWritablePropertyBag
  68. {
  69. public:
  70.   NS_DECL_ISUPPORTS
  71.   NS_DECL_NSIWRITABLEPROPERTYBAG
  72.  
  73.   nsWritablePropertyBag();
  74.  
  75. private:
  76.   ~nsWritablePropertyBag();
  77.  
  78. protected:
  79.   /* additional members */
  80. };
  81.  
  82. /* Implementation file */
  83. NS_IMPL_ISUPPORTS1(nsWritablePropertyBag, nsIWritablePropertyBag)
  84.  
  85. nsWritablePropertyBag::nsWritablePropertyBag()
  86. {
  87.   /* member initializers and constructor code */
  88. }
  89.  
  90. nsWritablePropertyBag::~nsWritablePropertyBag()
  91. {
  92.   /* destructor code */
  93. }
  94.  
  95. /* void setProperty (in AString name, in nsIVariant value); */
  96. NS_IMETHODIMP nsWritablePropertyBag::SetProperty(const nsAString & name, nsIVariant *value)
  97. {
  98.     return NS_ERROR_NOT_IMPLEMENTED;
  99. }
  100.  
  101. /* void deleteProperty (in AString name); */
  102. NS_IMETHODIMP nsWritablePropertyBag::DeleteProperty(const nsAString & name)
  103. {
  104.     return NS_ERROR_NOT_IMPLEMENTED;
  105. }
  106.  
  107. /* End of implementation class template. */
  108. #endif
  109.  
  110.  
  111. #endif /* __gen_nsIWritablePropertyBag_h__ */
  112.